import 'element-plus/dist/index.css'
import 'xhh-design/theme-chalk/index-xhh.css'
import './assets/main.css'
import './assets/common.less'

import {createApp} from 'vue'
import {createPinia} from 'pinia'
import XhhDesign from 'xhh-design'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.min.mjs'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import App from './App.vue'
import router from './router'

const app = createApp(App)

for (const [ key, component ] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(createPinia())
app.use(router)
app.use(XhhDesign)
app.use(ElementPlus, { locale: zhCn })
app._context.components.ElDialog.props.closeOnClickModal.default = false

app.mount('#app')
